import { Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    // 放到service里面
    return this.appService.getHello();
  }

  // 装饰器 get请求
  @Post('/login')
  postHello(): string {
    return this.appService.getHello();
  }
}
